#include "pattern.hh"
#include <fstream>
#include <vector>
#include <iostream>

int main()
{
    std::ifstream infile {"./src/day13/input.txt"};
    std::vector<Pattern> patterns {};
    while (!infile.eof()) 
    {
        patterns.emplace_back(infile);
    }

    std::size_t sum = 0;
    for (const Pattern& p : patterns)
        sum += p.mirrorsPosition();
    std::cout << sum << std::endl;

    return 0;
}